package avicit.bdp.dms.dss.service;

import avicit.bdp.common.base.BaseService;
import avicit.bdp.dms.dss.dao.ResourceTagDAO;
import avicit.bdp.dms.dss.dto.ResourceTagDTO;
import avicit.bdp.dms.prm.dto.TagDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/** 
 * 数据资源标签关联表服务
 *
 */
@Transactional
@Service
public class ResourceTagService extends BaseService<ResourceTagDAO, ResourceTagDTO> {

    @Autowired
    private ResourceTagDAO resourceTagDao;

    public int deleteByDataResourceId(String dataResourceId){
        return resourceTagDao.deleteByDataResourceId(dataResourceId);
    }

    public int insertListByBatch(List<ResourceTagDTO> resourceTagList){
        return resourceTagDao.insertListByBatch(resourceTagList);
    }

    public List<TagDTO> getTagList(String dataResourceId){
        return resourceTagDao.getTagList(dataResourceId);
    }

}
